﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;

using NewDDSys.Entity;
using NewDDSys.IBLL;
using NewDDSys.IDAL;
using NewDDSys.Factory;
using NewDDSys.Utility;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Web_KCQS : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {

        ArrayList ChartD21 = new ArrayList();
        ArrayList arDay = new ArrayList();
        DateTime st = Convert.ToDateTime(txtSday.Text.ToString());
        DateTime et = Convert.ToDateTime(txtEday.Text.ToString());
        TimeSpan fw = et - st;
        int j = fw.Days;
        for (int i = 0; i<(j+1); i++)
        {
            decimal kc = 0;
            string kc1 = BLLFactory.CreateXkcdtBLL().ZKC(st.AddDays(i).ToShortDateString().ToString());
            if (kc1 != "")
                kc = Convert.ToDecimal(kc1);
            string kc2 = BLLFactory.CreateBkcdtBLL().ZKC(st.AddDays(i).ToShortDateString().ToString());
            if (kc2 != "")
                kc = kc + Convert.ToDecimal(kc2);
            string kc3 = BLLFactory.CreateRkcdtBLL().ZKC(st.AddDays(i).ToShortDateString().ToString());
            if (kc3 != "")
                kc = kc + Convert.ToDecimal(kc3);
            string kc4 = BLLFactory.CreateLkcdtBLL().ZKC(st.AddDays(i).ToShortDateString().ToString());
            if (kc4 != "")
                kc = kc + Convert.ToDecimal(kc4);
            string kc5 = BLLFactory.CreateZkcdtBLL().ZKC(st.AddDays(i).ToShortDateString().ToString());
            if (kc5 != "")
                kc = kc + Convert.ToDecimal(kc5);
            ChartD21.Add(kc.ToString("f2"));
            arDay.Add(st.AddDays(i).ToShortDateString().ToString());

            
        }
        ArrayList[] ChartData2 = { ChartD21 };
        


        Chartlet1.InitializeData(ChartData2, arDay, null);
        

    }
}
